/*
 *  Cero Project - Copyright   2006 The Cero Developement Team 
 *  (Michael Laguerre, Camille Roux, Matthieu Segret, Mathieu Sivade) 
 * 
 *  This program is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU General Public License as published by the Free 
 *  Software Foundation; either version 2 of the License, or (at your option) 
 *  any later version.
 * 
 *  This program is distributed in the hope that it will be useful, but 
 *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 *  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
 *  for more details.
 */

package org.ceroproject;

import org.ceroproject.plugin.PluginManager;
import org.ceroproject.ui.InterfaceModule;
import org.ceroproject.ui.UserInterface;

/*
 * FIXME : IMPORTANT !! This file must be put into a different project to have
 * it work ! This problem will remain as long as Plugins aren't implemented !
 * Add the needed dependencies, too !
 */

/**
 * The main class to start off cero
 * 
 * @author Telem
 */
public class CeroLauncher {
	public static void main(String[] args) {
		// FIXME : get into generic form for plugins loading, and define the
		// interface to launch using a config file
		PluginManager manager = PluginManager.getInstance();
		// must be loaded in this order, parents first
		manager.loadFolder("games");
		manager.loadFolder("games/uno");

		// must be created before the game
		UserInterface myUI = manager
				.getNewUserInterface("Cero Devint interface");

		for (InterfaceModule mod : myUI.getInterfaceModules())
			myUI.activateInterfaceModule(mod);

		myUI.setActivated(true);
	}
}
